<!-- INCLUDE cms/output/header_body.html -->

<!-- INCLUDE cms/menu/output/option_bar_body.html -->

<section class="full-content">

	<article class="ajax" style="display:none;"></article>

	<article>
		<div class="head">Menu overview</div>
		<div class="content">
		   	<div class="overview">
				<div class="row heading">
					<div style="width: 400px;">Title</div>
					<div style="width: 130px;">Target</div>
					<div style="width: 80px; text-align:center;">View</div>
					<div style="width: 80px; text-align:center;">Edit</div>
					<div style="width: 80px; text-align:center;">Delete</div>
				</div>
				<!-- BEGIN menu -->
				<div class="row">
					<div style="width: 400px;">{menu.TITLE}</div>
					<div style="width: 130px;">{menu.TARGET}</div>
					<div style="width: 80px; text-align:center;"><a href="{menu.VIEW}" target="_blank"><input type="button" value="View" /></a></div>
					<div style="width: 80px; text-align:center;"><a onclick="menu_edit({menu.ID1})"><input type="button" value="Edit" /></a></div>
					<div style="width: 80px; text-align:center;"><a onclick="menu_delete({menu.ID2})"><input type="button" value="Delete" /></a></div>
				</div>
				<!-- END menu -->
			</div>
		</div>
	</article>
</section>
<script type="text/javascript">
function menu_edit(id)
{
	$('.ajax').load('cms.php?p=menu&act=edit&id='+id+'&ajax=true');
	$.blockUI({ 
		message: $('.ajax'),
		css: {
			width: '850px',
			height: '350px',
			padding: '10px',
			margin: 0,
			//left: '16%',
			//top: '25%',
			top:  ($(window).height() - 350) /2 + 'px', 
   			left: ($(window).width() - 850) /2 + 'px', 
			cursor: 'default',
			borderRadius: '10px'
		}
	}); 
}

function menu_delete(id)
{
	$('.ajax').load('cms.php?p=menu&act=delete&id='+id+'&ajax=true');
	$.blockUI({ 
		message: $('.ajax'),
		css: {
			width: '850px',
			height: '100px',
			padding: '10px',
			margin: 0,
			//left: '16%',
			//top: '25%',
			top:  ($(window).height() - 350) /2 + 'px', 
   			left: ($(window).width() - 850) /2 + 'px', 
			cursor: 'default',
			borderRadius: '10px'
		}
	});
}
</script>

<!-- INCLUDE cms/output/footer_body.html -->